import config from "@/config"
import http from "@/utils/request"

export default {
    // bom
    bom: {
		list: {
			url: `${config.API_URL}/adminapi/bom.Bom/lists`,
			name: "获取bom",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/bom.Bom/add`,
			name: "添加bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/bom.Bom/edit`,
			name: "编辑bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/bom.Bom/delete`,
			name: "删除bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        detail: {
			url: `${config.API_URL}/adminapi/bom.Bom/detail`,
			name: "bom详情",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/bom.Bom/updateStatus`,
			name: "修改bom状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        search:{
            url: `${config.API_URL}/adminapi/bom.BomChild/lists`,
			name: "BOM正向查询",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
	},
    // bom类别
    bomCate: {
		list: {
			url: `${config.API_URL}/adminapi/bom.BomCategory/lists`,
			name: "获取bom",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/bom.BomCategory/add`,
			name: "添加bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/bom.BomCategory/edit`,
			name: "编辑bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/bom.BomCategory/delete`,
			name: "删除bom",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
}
